@charset "utf-8";

@xiaomiColor:#ff6a00;
@box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.15);
@box-shadowB: 0 15px 25px 0 rgba(0, 0, 0, 0.03);

.none{display: none;}

html{height: 100%;}
body{
    display: flex;
    height: 100%;
    // 左侧背景
    .login_bg{
        width: 375px;
        height: 100%;
        display: flex;
        align-items: center;
        overflow: hidden;
        img{width: 100%;}
    }
    // 主体
    main{
        flex:1;
        overflow: auto;
        // 顶部帮助
        header{
            height: 80px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            h2{
                display: flex;
                align-items: center;
                img{height: 40px;}
                span{font-size: 24px;margin-left: 10px;font-weight: normal;}
            }
            ul{
                display: flex;
                align-items: center;
                >em{border-right: 1px solid #ddd;line-height: 14px;}
                li{
                    line-height: 80px;
                    a{
                        font-size: 14px;
                        color: #838383;
                        margin-right: 20px;
                        transition: color .3s;
                        &:hover{
                            color: @xiaomiColor;
                        }
                    }
                    
                    &:last-child{
                        position: relative;
                        margin-left:20px;
                        >a{
                            line-height: 14px;
                            margin-right: 10px;
                            i{
                                display: inline-block;
                                border: 5px solid transparent;
                                border-top-color: #838383;
                                margin-left: 8px;
                                transform: translateY(3px);
                                transition: transform .2s;
                            }
                            &:hover i{
                                transform: rotate(-180deg) translateY(2px);
                                border-top-color: @xiaomiColor;
                            }
                        }
                        &:hover{
                            dl{display: flex;}
                        }
                    }
                }
                dl{
                    position: absolute;
                    display: none;
                    top: 65px;
                    left: -5px;
                    height: 80px;
                    width: 95px;
                    border-radius: 5px;
                    flex-flow: column;
                    box-shadow: @box-shadow;
                    dd{
                        flex: 1;
                        a{
                            display: block;
                            text-align: center;
                            line-height: 40px;
                            width: 100%;
                            height: 100%;
                            &:hover{
                                background-color: #fff3e6;
                                color: #333;
                            }
                        }
                    }
                }
            }
        }
        // 登录/注册框
        #loginbar{
            width: 450px;
            margin: 20px auto 60px;
            padding-bottom: 150px;
            padding-bottom: 180px;
            border-radius: 5px;
            position: relative;
            box-shadow: @box-shadowB;
            #type_toggle{
                position: absolute;
                background-color: #ffbe99;
                border-top-right-radius: 5px;
                right: 0;
                top: 0;
                width: 65px;
                height: 65px;
                text-align: center;
                cursor: pointer;
                span{
                    line-height: 65px;
                    font-size: 36px;
                    position: relative;
                    right: -5px;
                    top: -5px;
                    color: white;
                }
                .title{
                    position: absolute;
                    z-index: 500;
                    top: 10px;
                    right: 70px;
                    width: 82px;
                    height: 30px;
                    background-color: @xiaomiColor;
                    box-shadow: 0 2px 6px 0 #ff6a0055;
                    line-height: 30px;
                    font-size: 14px;
                    color: white;
                    border-radius: 5px;
                    transition: all .3s;
                    opacity: 0;
                    transform: scale(.5) translateX(50px);
                    &::after{
                        content: '';
                        display: block;
                        position: absolute;
                        top: 10px;
                        right: -5px;
                        width: 10px;
                        height: 10px;
                        transform: rotate(45deg);
                        background-color: @xiaomiColor;
                    }
                }
                &::after{
                   content: ''; 
                   display: block;
                   position: absolute;
                   background-color: white;
                   transform: rotate(45deg);
                   width: 100px;
                   height: 100px;
                   bottom: -52px;
                   left: -52px;
                }
                &:hover{
                    background-color: @xiaomiColor;
                    .title{
                        transform: scale(1);
                        opacity: 1;
                    }
                }
            }
            #login_toggle{
                text-align: left;
                padding-top: 50px;
                margin-left: 45px;
                height: 40px;
                a{
                    font-size: 22px;
                    margin-right: 20px;
                    margin-left: 1px;
                    color: #bbb;
                    &.on{
                        color: #333;
                    }
                }
                i{
                    display: block;
                    width: 45px;
                    height: 4px;
                    margin-top: 2px;
                    border-radius: 2px;
                    background-color: @xiaomiColor;
                    
                    &.right{margin-left: 65px;}
                }
            }
            form{
                text-align: center;
                input,select{
                    box-sizing: border-box;
                    width: 355px;
                    height: 60px;
                    margin-top: 20px;
                    margin-bottom: 15px;
                    padding-left: 20px;
                    border-radius: 5px;
                    background-color: #f9f9f9;
                    border: 1px solid transparent;
                    outline: 1px solid transparent;
                    padding-top: 20px;
                    font-size: 16px;
                    &[type='button']{
                        background-color: #ffbe99;
                        color: white;
                        padding: 0;
                        font-size: 18px;
                        line-height: 60px;
                        transition: background-color .3s;
                        &:hover{background-color: #ffcba9;}
                    }
                }
                select{                        
                    appearance:none;
                    -moz-appearance:none;
                    -webkit-appearance:none;
                }
                >div{
                    position: relative;
                    span{
                        position: absolute;
                        top: 20px;
                        left: 70px;
                        &:nth-of-type(1){
                            font-size: 18px;
                            line-height: 60px;
                            color: #aaa;
                            transition: all .3s;
                            pointer-events: none;
                        }
                        &:nth-of-type(2){
                            color: #bbb;
                            line-height: 60px;
                            padding: 0 25px;
                            left: 331px;
                            font-size: 22px;
                            cursor: pointer;
                            &:hover{color: #898989;}
                        }
                    }
                    >a{
                        position: absolute;
                        right: 70px;
                        top: 40px;
                        font-size: 14px;
                        color: @xiaomiColor;
                    }
                    p{
                        margin-left: 45px;
                        font-size: 12px;
                        line-height: 12px;
                        text-align: left;
                        color: #f04645;
                    }
                    &.addr{
                        span:nth-of-type(1){
                            font-size: 12px;
                            line-height: 35px;
                            color: #aaa;
                        } 
                        &:focus-within{
                            .title{
                                opacity: 1;
                                transition: all .3s;
                                transform: scale(1);
                            }
                        }
                        .title{
                            position: absolute;
                            opacity: 0;
                            z-index: 20;
                            top: 15px;
                            right: -245px;
                            width: 275px;
                            height: 70px;
                            border-radius: 5px;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            background-color: white;
                            box-shadow: @box-shadow;
                            transform: scale(.5) translateX(-200px);
                            span:nth-of-type(1){
                                position: static;
                                color: @xiaomiColor;
                                margin-right: 5px;
                                margin-top: -20px;
                                font-size: 16px;
                            }
                            span:nth-of-type(2){
                                position: static;
                                text-align: left;
                                color: #333;
                                font-size: 12px;
                                width: 210px;
                                line-height: 18px;
                                padding: 0;
                            }
                            &::before{
                                content: '';
                                display: block;
                                position: absolute;
                                background-color: white;
                                transform: rotate(45deg);
                                box-shadow: -2px 2px 3px 0 rgba(0, 0, 0, 0.1);
                                z-index: -5;
                                left: -5px;
                                top: 30px;
                                width: 10px;
                                height: 10px;
                            }
                        }
                    } 
                    #phone_form{
                        margin-top: -15px;
                        display: flex;
                        padding: 0 46px;
                        .prefix{
                            width: 145px;
                            select{
                                border-radius: 5px 0 0 5px;
                                width: 100%;
                                padding-left: 22px;
                                border-right: none;
                            }
                            span:nth-of-type(1){
                                font-size: 12px;
                                line-height: 35px;
                                color: #aaa;
                            }
                        }
                        
                        .phone_number{
                            flex: 1;
                            input{
                                width: 100%;
                                border-radius: 0 5px 5px 0;
                                border-left: none;
                                box-shadow: none;
                            }
                            span{
                                left: 210px;
                            }
                        }
                        span:nth-of-type(2){
                            left: 120px;
                        }
                        span:nth-of-type(3){
                            left: 200px;
                            line-height: 60px;
                            color: #959595;
                        }
                    }
                    &:focus-within,&:focus-within .phone_number,.input{
                        input,select{
                            background-color: white;
                            border: 1px solid #ff5c00;
                            box-shadow: 0 0 0 1px #f9f9f9;
                            box-shadow: 0 0 0 2px #fcf2f3;
                        }
                        span:nth-of-type(1){
                            font-size: 12px;
                            line-height: 35px;
                            color: #aaa;
                        }
                    }
                    span.input{
                        font-size: 12px;
                        line-height: 35px;
                        color: #aaa;
                    }
                    input.err,select.err{
                        background-color: #fcf2f3;
                    }
                }
                >p{
                    display: flex;
                    justify-content: space-between;
                    padding: 0 45px;
                    a{color: @xiaomiColor;}
                }
                #agree{
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    color: #aaa;
                    font-size: 14px;
                    margin-top: 10px;
                    cursor: pointer;
                    a{color: #333;margin: 0 5px;}
                    i{
                        display: inline-block;
                        background-color: #f9f9f9;
                        color: #f9f9f9;
                        border: 1px solid #ddd;
                        box-sizing: border-box;
                        height: 20px;
                        width: 20px;
                        margin-right: 5px;
                        border-radius: 5px;
                        &:active{
                            background-color: @xiaomiColor;
                            color: white;
                        }
                    }

                }
            }
            #more_type{
                position: absolute;
                box-sizing: border-box;
                bottom:  0;
                width: 100%;
                padding: 0 100px;
                dt{
                    text-align: center;
                    font-size: 16px;
                    color: #aaa;
                }
                dd{
                    float: left;
                    margin: 18px 21.5px 40px 0;
                    a span{
                        font-size: 46px;
                        
                    }
                    &:last-child{margin-right: 0;}
                }
            }
        }
        // 注册信息
        >p{
            text-align: center;
            color: #999;
            font-size: 12px;
            line-height: 60px;
            a{color: #999;}
        }
    }
}
